package com.hse.gui;

import javax.swing.*;
import java.awt.*;

/**
 * Created by IntelliJ IDEA.
 * User: Nosov Alexander
 * Date: 02.06.2009
 * Time: 13:53:45
 * To change this template use File | Settings | File Templates.
 */
public class ClientComponentBorder extends JPanel {
    IClientComponent clientComponent;
    String name;

    public ClientComponentBorder(IClientComponent clientComponent, String name) {
        this.clientComponent = clientComponent;
        this.name = name;
        setLayout(new BorderLayout());
        setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), name));
        add((JComponent) clientComponent, BorderLayout.CENTER);
    }

    @Override
    public String toString() {
        return name;
    }
}
